home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Your Apple Games Gallery 1
/
Your Apple Games Gallery (Side A)(MicroSPARC, Inc.)(1988).do
/
MAKE.TRK.TABLES.bas
< prev
next >
Wrap
BASIC Source File
|
2021-12-11
|
12KB
|
308 lines
10 REM **********************
20 REM * MAKE.TRK.TABLES *
30 REM * BY COLIN FRENCH *
40 REM * COPYRIGHT (C) 1986 *
50 REM * BY MICROSPARC, INC *
60 REM * CONCORD, MA 01742 *
70 REM **********************
80 ONERR GOTO 3080
90 TEXT : HOME : VTAB 5: LOMEM: 35840
100 PRINT TAB( 5)"FORMULA.NIBBLE TABLE GENERATOR": PRINT
110 PRINT : PRINT "MAKING XBYTE & XBIT..."
120 X1 = 239:BYT = 28672:BIT = 28928
130 POKE BYT,X1: POKE BYT +1,X1
140 POKE BIT,3: POKE BIT +1,5
150 X = 2:BYT = BYT +X:BIT = BIT +X:X1 = X1 +1
160 FOR N = 0 TO 3:X = X +1: IF X >256 THEN 250
170 POKE BYT,X1: POKE BIT,N *2
180 BYT = BYT +1:BIT = BIT +1: NEXT
190 X1 = X1 +1: IF X1 = 256 THEN X1 = 0
200 FOR N = 0 TO 2:X = X +1: IF X >256 THEN 250
210 POKE BYT,X1: POKE BIT,N *2 +1
220 BYT = BYT +1:BIT = BIT +1: NEXT
230 X1 = X1 +1: IF X1 = 256 THEN X1 = 0
240 GOTO 160
250 PRINT : PRINT "MAKING SCRNLO & SCRNHI..."
260 FOR Y = 0 TO 191
270 Y1 = INT(Y/64)
280 Y2 = INT((Y -Y1 *64)/8)
290 Y3 = Y -Y1 *64 -Y2 *8
300 ADD = 8192 +Y1 *40 +Y2 *128 +Y3 *1024
310 POKE 29184 +Y,ADD - INT(ADD/256) *256
320 POKE 29376 +Y, INT(ADD/256)
330 NEXT
340 PRINT : PRINT "POKEING LEFT TRACK EDGE PATTERNS..."
350 FOR N = 0 TO 127: READ D: POKE 29568 +N,D: NEXT
360 DATA 127,126,124,121,114,101,74,0
370 DATA 1,3,7,15,31,63,127,0
380 DATA 63,126,124,121,114,101,74,0
390 DATA 0,0,1,3,7,15,31,0
400 DATA 15,30,60,121,114,101,74,0
410 DATA 0,0,0,0,1,3,7,0
420 DATA 3,6,12,25,50,101,74,0
430 DATA 0,0,0,0,0,0,1,0
440 DATA 85,42,84,41,82,37,74,0
450 DATA 0,1,2,5,10,21,42,0
460 DATA 37,42,84,41,82,37,74,0
470 DATA 0,0,0,1,2,5,10,0
480 DATA 5,10,20,41,82,37,74,0
490 DATA 0,0,0,0,0,1,2,0
500 DATA 1,2,4,9,18,37,74,0
510 DATA 0,0,0,0,0,0,0,0
520 PRINT : PRINT "POKEING RIGHT TRACK EDGE PATTERNS..."
530 FOR N = 0 TO 127: READ D: POKE 29696 +N,D: NEXT
540 DATA 127,126,124,120,112,96,64,0
550 DATA 85,43,87,47,95,63,127,0
560 DATA 63,126,124,120,112,96,64,0
570 DATA 85,42,85,43,87,47,95,0
580 DATA 47,94,60,120,112,96,64,0
590 DATA 85,42,85,42,85,43,87,0
600 DATA 43,86,44,88,48,96,64,0
610 DATA 85,42,85,42,85,42,85,0
620 DATA 85,42,84,40,80,32,64,0
630 DATA 84,41,82,37,74,21,42,0
640 DATA 21,42,84,40,80,32,64,0
650 DATA 85,42,84,41,82,37,74,0
660 DATA 37,74,20,40,80,32,64,0
670 DATA 85,42,85,42,84,41,82,0
680 DATA 41,82,30,72,16,32,64,0
690 DATA 85,42,85,42,85,42,85,0
700 PRINT : PRINT "POKEING WHITE CENTER LINE PATTERNS..."
710 FOR N = 0 TO 7: READ D: POKE 29824 +N,D: NEXT
720 DATA 3,6,12,24,48,96,96,0
730 PRINT : PRINT "POKEING TRACK EDGE PATTERN ADDRESSES..."
740 FOR N = 0 TO 31: READ D: POKE 29832 +N,D: NEXT
750 DATA 128,144,160,176,136,152,168,184
760 DATA 192,208,224,240,200,216,232,248
770 DATA 0,16,32,48,8,24,40,56
780 DATA 64,80,96,112,72,88,104,120
790 PRINT : PRINT "POKEING SIZES OF TRACK SEGMENTS..."
800 FOR N = 0 TO 3: POKE 29888 +N,0: NEXT
810 FOR N = 4 TO 11: POKE 29888 +N,1: NEXT
820 FOR N = 12 TO 19: POKE 29888 +N,2: NEXT
830 FOR N = 20 TO 23: POKE 29888 +N,3: NEXT
840 PRINT : PRINT "MAKING TRACK WIDTH TABLE..."
850 FOR N = 0 TO 39: POKE 29912 +N,N *2 +4: NEXT
860 PRINT : PRINT "MAKING PERSPEC & PERFRC TABLES..."
870 FOR N = 0 TO 127
880 V = INT((127 -N) *6.4 +0.5)
890 VH = INT(V/256):VL = V -VH *256
900 POKE 29952 +N,VH: POKE 30208 +N,VL: NEXT
910 FOR N = 128 TO 255
920 V = INT((255 -N) *6.4 +64717.5)
930 VH = INT(V/256):VL = V -VH *256
940 POKE 29952 +N,VH: POKE 30208 +N,VL: NEXT
950 PRINT : PRINT "POKEING YLIMIT TABLE..."
960 FOR N = 0 TO 23: READ D: POKE 30464 +N,D: NEXT
970 DATA 101,98,95,92,90,88,86,84
980 DATA 82,80,78,76,75,74,73,72
990 DATA 71,70,69,68,67,66,65,64
1000 PRINT : PRINT "MAKING GRASS PATTERN..."
1010 FOR N = 0 TO 39 STEP 2
1020 POKE 30488 +N,42: POKE 30489 +N,85
1030 NEXT
1040 PRINT : PRINT "POKEING ROADSIDE POST PATTERNS..."
1050 FOR N = 0 TO 63: READ D: POKE 30560 +N,D: NEXT
1060 DATA 127,126,124,120,112,96,64,0
1070 DATA 1,3,7,15,31,63,127,0
1080 DATA 63,126,124,120,112,96,64,0
1090 DATA 0,0,1,3,7,15,31,0
1100 DATA 15,30,60,120,112,96,64,0
1110 DATA 0,0,0,0,1,3,7,0
1120 DATA 3,6,12,24,48,96,64,0
1130 DATA 0,0,0,0,0,0,1,0
1140 PRINT : PRINT "POKEING POST PATTERN ADDRESSES..."
1150 FOR N = 0 TO 15: READ D: POKE 30624 +N,D: NEXT
1160 DATA 96,112,128,144,119,119,119,119
1170 DATA 104,120,136,152,119,119,119,119
1180 PRINT : PRINT "POKEING POST SIZES..."
1190 FOR N = 0 TO 3: POKE 30640 +N,0: NEXT
1200 FOR N = 4 TO 11: POKE 30640 +N,1: NEXT
1210 FOR N = 12 TO 19: POKE 30640 +N,2: NEXT
1220 FOR N = 20 TO 23: POKE 30640 +N,3: NEXT
1230 PRINT : PRINT "POKEING POST DRAWING PARAMETERS..."
1240 FOR N = 0 TO 95: READ D: POKE 30664 +N,D: NEXT
1250 DATA 102,99,96,93,91,89,87,85
1260 DATA 83,81,79,77,76,75,74,73
1270 DATA 72,71,70,69,68,67,66,65
1280 DATA 75,75,74,74,73,73,72,72
1290 DATA 71,71,70,70,69,69,68,68
1300 DATA 67,67,66,66,65,65,64,64
1310 DATA 115,109,103,97,90,85,80,75
1320 DATA 70,65,60,55,49,45,41,37
1330 DATA 33,29,25,21,16,13,10,7
1340 DATA 111,105,99,93,87,82,77,72
1350 DATA 67,62,57,52,47,43,39,35
1360 DATA 31,27,23,19,15,12,9,6
1370 PRINT : PRINT "POKEING DIGIT BIT PATTERNS..."
1380 FOR N = 0 TO 87: READ D: POKE 30760 +N,D: NEXT
1390 DATA 30,51,51,51,51,51,51,30
1400 DATA 12,14,12,12,12,12,12,30
1410 DATA 30,51,48,28,14,3,3,63
1420 DATA 30,51,48,28,48,48,51,30
1430 DATA 48,56,60,54,51,127,48,48
1440 DATA 63,3,3,31,48,48,51,30
1450 DATA 30,51,3,31,51,51,51,30
1460 DATA 63,48,24,12,6,6,6,6
1470 DATA 30,51,51,30,51,51,51,30
1480 DATA 30,51,51,51,62,48,51,30
1490 DATA 0,0,0,0,0,0,0,0
1500 PRINT : PRINT "POKEING IN DIGIT ADDRESSES..."
1510 FOR N = 0 TO 15: POKE 30848 +N,N *8 +40
1520 POKE 30864 +N,120: NEXT
1530 PRINT : PRINT "POKEING IN TEXT LINE ADDRESSES..."
1540 POKE 30880,208: POKE 30881,208
1550 FOR N = 2 TO 7: POKE 30880 +N,80: NEXT
1560 POKE 30888,58: POKE 30889,62
1570 FOR N = 2 TO 7: POKE 30888 +N,N *4 +27: NEXT
1580 PRINT : PRINT "POKEING LEFT FRONT TIRE BIT PATTERNS..."
1590 FOR N = 0 TO 191: READ D: POKE 30896 +N,D: NEXT
1600 DATA 112,127,127,127,127,127,127,127
1610 DATA 15,12,0,0,0,0,0,12
1620 DATA 0,48,3,0,0,0,0,0
1630 DATA 3,0,64,0,0,0,0,0
1640 DATA 128,224,128,224,128,224,128,124
1650 DATA 128,152,128,152,128,152,128,152
1660 DATA 128,152,128,216,128,212,128,213
1670 DATA 160,213,0,0,0,0,0,0
1680 DATA 0,96,127,127,127,127,127,127
1690 DATA 3,64,31,0,0,0,0,15
1700 DATA 0,60,60,0,0,0,0,96
1710 DATA 0,0,64,0,0,0,0,0
1720 DATA 128,152,128,152,128,134,128,134
1730 DATA 128,134,192,129,192,129,192,129
1740 DATA 192,129,192,193,192,213,128,213
1750 DATA 130,213,0,0,0,0,0,0
1760 DATA 0,0,127,127,127,127,127,127
1770 DATA 0,64,127,0,0,0,126,0
1780 DATA 0,63,60,0,0,0,64,1
1790 DATA 0,0,0,0,0,0,0,0
1800 DATA 176,128,176,128,140,128,140,128
1810 DATA 140,128,140,128,131,128,131,128
1820 DATA 131,128,131,192,131,212,131,213
1830 DATA 169,213,0,0,0,0,0,0
1840 PRINT : PRINT "POKEING RIGHT FRONT TIRE BIT PATTERNS..."
1850 FOR N = 0 TO 191: READ D: POKE 31088 +N,D: NEXT
1860 DATA 0,127,127,127,127,127,127,0
1870 DATA 0,126,0,0,63,0,0,0
1880 DATA 127,1,1,0,0,64,1,0
1890 DATA 0,0,30,0,0,0,0,0
1900 DATA 128,134,128,134,128,152,128,152
1910 DATA 128,152,128,152,128,224,128,224
1920 DATA 128,224,130,224,170,224,170,225
1930 DATA 170,229,0,0,0,0,0,0
1940 DATA 96,127,127,127,127,127,127,3
1950 DATA 0,30,0,120,0,0,0,0
1960 DATA 124,1,1,0,0,3,0,0
1970 DATA 0,0,30,0,0,0,0,0
1980 DATA 140,128,140,128,176,128,176,128
1990 DATA 176,128,192,129,192,129,192,129
2000 DATA 192,129,194,129,234,129,170,129
2010 DATA 170,133,0,0,0,0,0,0
2020 DATA 120,127,127,127,127,127,127,127
2030 DATA 7,6,0,24,0,0,0,0
2040 DATA 0,24,1,0,96,0,0,0
2050 DATA 0,0,96,0,0,0,0,0
2060 DATA 131,128,131,128,131,128,131,128
2070 DATA 140,128,140,128,140,128,140,128
2080 DATA 140,128,142,128,170,128,170,128
2090 DATA 170,133,0,0,0,0,0,0
2100 PRINT : PRINT "POKEING TIRE PATTERN ADDRESSES..."
2110 FOR N = 0 TO 31: READ D: POKE 31280 +N,D: NEXT
2120 DATA 176,240,48,0,120,120,121,0
2130 DATA 208,16,80,0,120,121,121,0
2140 DATA 112,176,240,0,121,121,121,0
2150 DATA 144,208,16,0,121,121,122,0
2160 PRINT : PRINT "POKEING LEFT-HAND BIT PATTERNS..."
2170 FOR N = 0 TO 143: READ D: POKE 31312 +N,D: NEXT
2180 DATA 0,112,127,3,0,124,127,3
2190 DATA 0,124,127,3,0,124,127,3
2200 DATA 0,124,127,3,0,124,127,0
2210 DATA 0,124,127,0,0,124,127,0
2220 DATA 96,124,127,0,120,124,127,12
2230 DATA 120,124,127,60,126,124,127,60
2240 DATA 0,112,127,3,0,124,127,3
2250 DATA 0,124,127,3,0,124,127,3
2260 DATA 96,124,127,3,120,124,127,12
2270 DATA 120,124,127,60,126,124,127,60
2280 DATA 126,115,127,60,126,15,6,63
2290 DATA 126,127,121,63,126,127,127,15
2300 DATA 96,124,127,3,120,124,127,12
2310 DATA 120,124,127,60,126,124,127,60
2320 DATA 126,115,127,60,126,15,6,63
2330 DATA 126,127,121,63,126,127,127,15
2340 DATA 126,127,127,15,120,127,127,3
2350 DATA 120,127,127,3,96,127,127,0
2360 PRINT : PRINT "POKEING RIGHT-HAND BIT PATTERNS..."
2370 FOR N = 0 TO 143: READ D: POKE 31456 +N,D: NEXT
2380 DATA 96,127,31,3,24,127,31,15
2390 DATA 30,127,31,15,30,127,31,63
2400 DATA 30,127,103,63,126,48,120,63
2410 DATA 126,79,127,63,120,127,127,63
2420 DATA 120,127,127,63,96,127,127,15
2430 DATA 96,127,127,15,0,127,127,3
2440 DATA 96,127,7,0,96,127,31,0
2450 DATA 96,127,31,0,96,127,31,0
2460 DATA 96,127,31,3,24,127,31,15
2470 DATA 30,127,31,15,30,127,31,63
2480 DATA 30,127,103,63,126,48,124,63
2490 DATA 126,79,127,63,120,127,127,63
2500 DATA 96,127,7,0,96,127,31,0
2510 DATA 96,127,31,0,96,127,31,0
2520 DATA 96,127,31,0,0,127,31,0
2530 DATA 0,127,31,0,0,127,31,0
2540 DATA 0,127,31,3,24,127,31,15
2550 DATA 30,127,31,15,30,127,31,63
2560 PRINT : PRINT "POKEING-HAND PATTERN ADDRESSES..."
2570 FOR N = 0 TO 15: READ D: POKE 31600 +N,D: NEXT
2580 DATA 80,128,176,0,122,122,122,0
2590 DATA 224,16,64,0,122,123,123,0
2600 PRINT : PRINT "POKEING INSTRUMENT NEEDLE BIT PATTERNS.."
2610 FOR N = 0 TO 159: READ D: POKE 31616 +N,D: NEXT
2620 DATA 129,192,129,192,128,128,192,130
2630 DATA 192,130,192,130,209,192,209,192
2640 DATA 129,192,129,192,128,128,192,130
2650 DATA 208,130,212,128,149,192,129,192
2660 DATA 129,192,129,192,128,128,212,130
2670 DATA 212,130,128,128,129,192,129,192
2680 DATA 129,192,149,192,212,128,208,130
2690 DATA 192,130,128,128,129,192,129,192
2700 DATA 209,192,209,192,192,130,192,130
2710 DATA 192,130,128,128,129,192,129,192
2720 DATA 193,194,193,194,192,130,192,130
2730 DATA 192,130,128,128,129,192,129,192
2740 DATA 129,202,129,202,192,130,192,130
2750 DATA 192,130,128,128,129,192,129,192
2760 DATA 129,192,129,200,128,170,192,138
2770 DATA 192,130,128,128,129,192,129,192
2780 DATA 129,192,129,192,128,128,192,170
2790 DATA 192,170,128,128,129,192,129,192
2800 DATA 129,192,129,192,128,128,192,130
2810 DATA 192,138,128,170,129,200,129,192
2820 PRINT : PRINT "POKEING INSTRUMENT PATTERN ADDRESSES..."
2830 FOR N = 0 TO 31: READ D: POKE 31776 +N,D: NEXT
2840 DATA 128,144,160,176,192,208,224,240
2850 DATA 0,16,0,0,0,0,0,0
2860 DATA 123,123,123,123,123,123,123,123
2870 DATA 124,124,0,0,0,0,0,0
2880 PRINT : PRINT "POKEING STARTING LIGHTS BIT PATTERNS..."
2890 FOR N = 0 TO 47: READ D: POKE 31808 +N,D: NEXT
2900 DATA 128,133,224,149,160,149,160,149
2910 DATA 160,149,128,149,0,0,0,0
2920 DATA 192,131,240,142,216,139,240,142
2930 DATA 216,139,224,130,0,0,0,0
2940 DATA 32,1,56,5,40,5,40,5
2950 DATA 40,5,32,1,0,0,0,0
2960 PRINT : PRINT "POKEING LIGHT PATTERN ADDRESSES..."
2970 FOR N = 0 TO 15: READ D: POKE 31856 +N,D: NEXT
2980 DATA 64,80,96,0,124,124,124,0
2990 DATA 16,19,22,0,0,0,0,0
3000 FOR N = 1 TO 5: PRINT : NEXT
3010 PRINT "===== ALL FINISHED!! =====": PRINT
3020 PRINT "INSERT DISK YOU WANT TO SAVE THE TABLES"
3030 PRINT "ON AND PRESS <RETURN> ";
3040 GET Z$: PRINT : PRINT "SAVING TABLES..."
3050 PRINT CHR$(4)"BSAVE TRK.TABLES,A$7000,L$C80"
3060 PRINT "SAVE COMPLETED."
3070 END
3080 HOME : TEXT : VTAB 12: PRINT "ERROR " PEEK(222)" IN LINE " PEEK(218) +256 * PEEK(219): END